
from lxml.builder import E
from lxml import etree
import json
import shortuuid

from odoo import models, fields, api
from odoo.exceptions import UserError
from datetime import datetime

import werkzeug
from odoo.http import Controller, route, local_redirect, request


from odoo import models, fields, api
from odoo import fields, models


class Play(models.Model):
    _name = 'play'

    name = fields.Char('名称')
    value_text = fields.Text('测试')

    @api.model
    def get_data(self):
        return {
            'header': ['名称', '日期', '备注', '业务伙伴', '借方', '贷方', '余额'],
            'body': [{'name': '1', 'date': '2020', 'note': 'note', 'partner_id': '', 'credit':0,'debit':0,'balance':0,
                      'children': [{'name': '1', 'date': '2020', 'note': 'note', 'partner_id': '', 'credit':0,'debit':0,'balance':0, 'children':[]}]},
                     {'name': '1', 'date': '2020', 'note': 'note', 'partner_id': '', 'credit':0,'debit':0,'balance':0, 'children':[]}]
        }
